<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<title>SEARCH DRINK</title>
<link rel="stylesheet" href="../../css/bootstrap/bootstrap.css"
	th:href="@{/css/bootstrap/bootstrap.css}" />
<script src="../../js/jquery-1.11.2.js" th:src="@{/js/jquery-1.11.2.js}"></script>
<script src="../../js/drink.js" th:src="@{/js/drink.js}"></script>
<style>
@font-face {
	font-family: 'Glyphicons Halflings';
	src: url('../fonts/glyphicons-halflings-regular.eot');
	src: url('../fonts/glyphicons-halflings-regular.eot?#iefix')
		format('embedded-opentype'),
		url('../fonts/glyphicons-halflings-regular.woff') format('woff'),
		url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),
		url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular')
		format('svg');
}
}
</style>
</head>
<body>
	<header></header>
	<nav class="navbar navbar-inverse">
		<div class="container-fluid">
			<div class="col-md-offset-1">
				<ul class="nav navbar-nav">
					<li><a><span></span>HOME</a></li>
					<li><a href="#"><span></span>FOOD</a></li>
					<li><a th:href="@{/food/formsearch}"><span></span>FOOD</a></li>
					<li><a href="#"><span></span>ORDER</a></li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li><a href="#"><span class="glyphicon glyphicon-search"></span>Sign
							Up</a></li>
					<li><a href="#"><span class="glyphicon glyphicon-log-in"></span>
							Login</a></li>
				</ul>
			</div>
		</div>
	</nav>
	<section>
		<article class="container col-md-10 col-md-offset-1">
			<ol class="breadcrumb">
				<li><a href="#">Home</a></li>
				<li><a href="#">Drink</a></li>
				<li class="active">Search</li>
			</ol>
			<div class="panel panel-success">
				<div class="panel-heading">DRINK MANAGEMENT</div>
				<div class="panel-body">
					<form id="searchdrink" name="searchdrink"
						th:action="@{/drink/searchdrink}" method="post"
						th:commandName="drink"
						class="form-horizontal container col-md-10 col-md-offset-1">
						<input type="hidden" id="restaurantId" name="restaurantId"
							th:value="${drink.restaurantId}" />
						<div class="form-group">
							<label class="control-label col-md-3">Restaurant Name:</label>
							<div class="col-md-9">
								<input type="text" class="form-control" id="restaurantName"
									name="restaurantName" th:value="${drink.restaurantName}"
									readonly="readonly" />
							</div>
						</div>
						<input type="hidden" id="menuDrinkId" name="menuDrinkId"
							th:value="${drink.menuDrinkId}" />
						<div class="form-group">
							<label class="control-label col-md-3">Menu Food Name:</label>
							<div class="col-md-9">
								<input type="text" class="form-control" id="menuDrinkName"
									name="menuDrinkName" th:value="${drink.menuDrinkName}"
									readonly="readonly" />
							</div>
						</div>
						<input type="hidden" id="drinkId" name="drinkId"
							th:value="${drink.drinkId}" />
						<div class="form-group">
							<label class="control-label col-md-3" for="drinkName">Drink
								Name:</label>
							<div class="col-md-9">
								<input type="text" class="form-control" id="drinkName"
									name="drinkName" placeholder="Enter drink name"
									th:value="${drink.drinkName}" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-md-3" for="drinkTitle">Drink
								Title:</label>
							<div class="col-md-9">
								<input type="text" class="form-control" id="drinkTitle"
									name="drinkTitle" placeholder="Enter drink title"
									th:value="${drink.drinkTitle}" />
							</div>
						</div>
						<!-- <div class="form-group">
							<label class="control-label col-md-3" for="createTime">Create
								Time:</label>
							<div class="col-md-4">
								<input type="date" class="form-control" id="createTime" name="createTime" />
							</div>
						</div> -->
						<div class="form-group">
							<label class="control-label col-md-3" for="oldPrice">Old
								Price:</label>
							<div class="col-md-9">
								<input type="number" class="form-control" id="oldPrice"
									name="oldPrice" th:value="${drink.oldPrice}" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-md-3" for="newPrice">New
								Price:</label>
							<div class="col-md-9">
								<input type="number" class="form-control" id="newPrice"
									name="newPrice" th:value="${drink.newPrice}" />
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-3 col-sm-3">
								<button type="submit"
									class="btn btn-primary glyphicon glyphicon-search">Search</button>
							</div>
							<div class="sm-offset-3 col-sm-3 pull-right">
								<a
									th:href="@{/drink/addform(restaurantId=${drink.restaurantId}, restaurantName=${drink.restaurantName}, menuDrinkId=${drink.menuDrinkId}, menuDrinkName=${drink.menuDrinkName})}">
									<button type="button"
										class="btn btn-primary glyphicon glyphicon-new-window">Add</button>
								</a>
							</div>
						</div>
					</form>
					<div th:unless="${#lists.isEmpty(list)}">
						<table class="table table-hover">
							<thead>
								<tr>
									<th>Drink Name</th>
									<th>Drink Title</th>
									<th>Create Time</th>
									<th>Old Price</th>
									<th>New Price</th>
									<th>Update Time</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="dr : ${list}">
									<td><a
										th:href="@{/drink/viewDrink(drinkId=${dr.drinkId})}"
										th:text="${dr.drinkName}"></a></td>
									<td th:text="${dr.drinkTitle}"></td>
									<td th:text="${dr.createTime}"></td>
									<td th:text="${dr.oldPrice}"></td>
									<td th:text="${dr.newPrice}"></td>
									<td th:text="${dr.updateTime}"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="panel-footer"></div>
			</div>
		</article>
	</section>
	<footer class="container col-md-12">
		<ol class="breadcrumb text-center">
			<li class="active"><p>@copyright - University Of Information
					Technology - Spring + hibernate + css3 + html5</p></li>
		</ol>
	</footer>
</body>
</html>